#ifndef MEASFORM_H
#define MEASFORM_H

#include <QMdiSubWindow>
#include <fstream>
#include "../core/aprcfg.h"
#include "ui_auto.h"

class QTableWidget;
class QPushButton;
class QLabel;

class MeasForm : public QMdiSubWindow
{
    Q_OBJECT

public:
    MeasForm(QWidget *parent = 0);
//	~MeasForm();

protected:
    static const int TABLE_PROGDATA_ROWS = 6;
    static const int TABLE_PROGDATA_COLS = 1;
    static const int TABLE_ITEMDATA_ROWS = 25;
    static const int TABLE_ITEMDATA_COLS = 5;

    void showItemData();
    void showTotalData();

	bool checkMaster();

public slots:
	void showMeasData();
	
	void startMeas();
	void stopMeas();

	void openMeasCfgDlg();

    void manualClicked();

private:
	Ui_AutoMeasForm ui;

    QTableWidget *tableProgData;
    QTableWidget *tableItemData;

    QPushButton  *btnSetting;
    QPushButton  *btnStartMeas;
	QPushButton	 *btnStop;
	QPushButton	 *btnManual;

	std::ofstream out_put;

	int semid;
};

#endif // MEASFORM_H
